<?php get_header(); ?>

<div id="bigcolumn">

	<?php if (have_posts()) : ?>
	
	<div class="page-all">
	<div class="page-top">
	<div class="containerI">

	<div class="sitenav">
	<a href="<?php bloginfo('url'); ?>"><?php print NAV_HOME; ?></a>&nbsp;&nbsp;&raquo;&nbsp;&nbsp;<?php print ARCHIVES; ?>
	</div>

	<div class="post">
	<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
	<?php /* If this is a category archive */ if (is_category()) { ?>
	<h2><?php single_cat_title(); ?></h2>
	<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
	<h2><?php print POSTS_TAGGED; ?> &#8216;<?php single_tag_title(); ?>&#8217;</h2>
	<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
	<h2><?php the_time('F jS, Y'); ?></h2>
	<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
	<h2><?php the_time('F, Y'); ?></h2>
	<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
	<h2><?php the_time('Y'); ?></h2>
	<?php /* If this is an author archive */ } elseif (is_author()) { ?>
	<h2><?php print AUTHOR_ARCHIVE; ?></h2>
	<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
	<h2><?php print BLOG_ARCHIVES; ?></h2>
	<?php } ?>
	</div>
	
	<!-- Plugin Navigation -->
	<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
	<!-- End -->
	
	<?php while (have_posts()) : the_post(); ?>

	<div id="post-<?php the_ID(); ?>" class="post item">
	<h1><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>
	<div class="postinfo"><?php print WRITTEN; ?> <?php print ON_TEXT; ?> <?php the_time('j M, Y'); ?> <?php print AT_TEXT; ?> <?php the_time('G:i'); ?> <?php print IN_TEXT; ?> <b><?php the_category(', ') ?></b> | <?php print VIEWED; ?> <b><?php if(function_exists('the_views')) { the_views(); } ?></b> <?php print TIMES; ?> | <a href="<?php the_permalink(); ?>#comments"><b><?php comments_number(NO_COMMENTS,ONE_COMMENT,MORE_COMMENTS); ?></b></a> <?php edit_post_link(EDIT_ARTICLE, '', ''); ?></div>
	<div class="post-thumb"><?php show_thumb($options['GTwidth'],$options['GTheight'],$options['crop'],$options['quality']); ?></div>
	<p><?php print do_excerpt(get_the_excerpt(), 40); ?> (<a href="<?php the_permalink(); ?>"><strong><?php print CONTINUE_READING; ?></strong></a>)</p>
	<?php the_tags('<div class="tags">'.TAGGED_WITH.' ', '&nbsp;&nbsp;&nbsp;&nbsp;', '</div>'); ?><div class="clear"></div>
	</div>

	<?php endwhile; ?>

	<!-- Plugin Navigation -->
	<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
	<!-- End -->
	
	</div>
	</div>
	</div>
	<div class="page-bottom"></div>

	<?php else : ?>
	
	<!-- Not found? -->
	<div class="page-all">
	<div class="page-top">
	<div class="containerI">
	
	<div class="sitenav">
	<a href="<?php bloginfo('url'); ?>"><?php print NAV_HOME; ?></a>&nbsp;&nbsp;&raquo;&nbsp;&nbsp;<?php print ERROR404; ?>
	</div>
	
	<div class="post">
	<h2><?php print CANNOT_FIND_IT; ?></h2>
	<p><?php print SEARCH_SUGGESTION; ?></p>
	<form class="find" method="get" action="<?php bloginfo('url'); ?>/">
		<fieldset>
			<input type="text" value="<?php the_search_query(); ?>" name="s" class="findfield" />
			<input type="submit" value="<?php print SEARCH; ?>" class="findsubmit" />
		</fieldset>
	</form>
	<h2><?php print YEARLY_ARCHIVE; ?></h2>
	<ul><?php wp_get_archives('type=yearly&show_post_count=1'); ?></ul>
	<h2><?php print MONTHLY_ARCHIVE; ?></h2>
	<ul><?php wp_get_archives('type=monthly&show_post_count=1'); ?></ul>
	<h2><?php print CATEGORY_ARCHIVE; ?></h2>
	<ul><?php wp_list_cats('sort_column=name&optioncount=1') ?></ul>
	<h2><?php print POSTS_ARCHIVE; ?></h2>
	<ul><?php wp_get_archives('type=postbypost') ?></ul>
	</div>
	
	</div>
	</div>
	</div>
	<div class="page-bottom"></div>

	<?php endif; ?>

<div class="clear"></div>
</div>

<?php get_sidebar(); ?>

<?php get_footer(); ?>